import { instance } from "../utils/request";
const getLoginLogsPagination = async (page:number,limit:number,key?:string) => {
	return await instance.get("/LoginLogs/Pagination", {page,limit,key});
};

const addLoginLogs = async (data:RequestCreateLoginLogsDto) => {
	return await instance.post("/LoginLogs/Add", data);
};

const updateLoginLogs = async (data:RequestUpdateLoginLogsDto) => {
	return await instance.post("/LoginLogs/Update", data);
};

const getLoginLogsDetail = async (id:number) => {
	return await instance.get("/LoginLogs/Detail", { id  });
};

const deleteLoginLogs = async (data:RequestIdLoginLogsDto) => {
	return await instance.post("/LoginLogs/Delete", data);
};

const LoginLogsApi = {
	getLoginLogsPagination,
	addLoginLogs,
	updateLoginLogs,
	getLoginLogsDetail,
	deleteLoginLogs,
};

export default LoginLogsApi
